﻿ 
using System;
using System.Windows.Input;
using VisualPoint.Controls.Actions;

namespace VisualPoint.Controls.Commands
{
    public class CopyCommand : ICommand
    {
        public CopyCommand(ICopy actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private ICopy _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.Copy();
        }
    }

	public interface ICopy
    {
        void Copy();

        CopyCommand CopyCommand { get; }
    }

    public class DeleteCommand : ICommand
    {
        public DeleteCommand(IDelete actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IDelete _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.Delete();
        }
    }

	public interface IDelete
    {
        void Delete();

        DeleteCommand DeleteCommand { get; }
    }

    public class EditCommand : ICommand
    {
        public EditCommand(IEdit actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IEdit _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.Edit();
        }
    }

	public interface IEdit
    {
        void Edit();

        EditCommand EditCommand { get; }
    }

    public class RunCommand : ICommand
    {
        public RunCommand(IRun actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IRun _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.Run();
        }
    }

	public interface IRun
    {
        void Run();

        RunCommand RunCommand { get; }
    }

    public class WindowConfigurationCommand : ICommand
    {
        public WindowConfigurationCommand(IWindowConfiguration actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IWindowConfiguration _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.WindowConfiguration();
        }
    }

	public interface IWindowConfiguration
    {
        void WindowConfiguration();

        WindowConfigurationCommand WindowConfigurationCommand { get; }
    }

    public class FileCloseActionCommand : ICommand
    {
        public FileCloseActionCommand(IFileCloseAction actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IFileCloseAction _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.FileCloseAction();
        }
    }

	public interface IFileCloseAction
    {
        void FileCloseAction();

        FileCloseActionCommand FileCloseActionCommand { get; }
    }

    public class FileOpenActionCommand : ICommand
    {
        public FileOpenActionCommand(IFileOpenAction actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IFileOpenAction _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.FileOpenAction();
        }
    }

	public interface IFileOpenAction
    {
        void FileOpenAction();

        FileOpenActionCommand FileOpenActionCommand { get; }
    }

    public class MoveItemDownCommand : ICommand
    {
        public MoveItemDownCommand(IMoveItemDown actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IMoveItemDown _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.MoveItemDown();
        }
    }

	public interface IMoveItemDown
    {
        void MoveItemDown();

        MoveItemDownCommand MoveItemDownCommand { get; }
    }

    public class MoveItemUpCommand : ICommand
    {
        public MoveItemUpCommand(IMoveItemUp actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IMoveItemUp _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.MoveItemUp();
        }
    }

	public interface IMoveItemUp
    {
        void MoveItemUp();

        MoveItemUpCommand MoveItemUpCommand { get; }
    }

    public class PasteCommand : ICommand
    {
        public PasteCommand(IPaste actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IPaste _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.Paste();
        }
    }

	public interface IPaste
    {
        void Paste();

        PasteCommand PasteCommand { get; }
    }

    public class TextSelectActionCommand : ICommand
    {
        public TextSelectActionCommand(ITextSelectAction actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private ITextSelectAction _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.TextSelectAction();
        }
    }

	public interface ITextSelectAction
    {
        void TextSelectAction();

        TextSelectActionCommand TextSelectActionCommand { get; }
    }

    public class TextWriteActionCommand : ICommand
    {
        public TextWriteActionCommand(ITextWriteAction actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private ITextWriteAction _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.TextWriteAction();
        }
    }

	public interface ITextWriteAction
    {
        void TextWriteAction();

        TextWriteActionCommand TextWriteActionCommand { get; }
    }

    public class ResizeActionCommand : ICommand
    {
        public ResizeActionCommand(IResizeAction actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IResizeAction _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.ResizeAction();
        }
    }

	public interface IResizeAction
    {
        void ResizeAction();

        ResizeActionCommand ResizeActionCommand { get; }
    }

    public class WindowSelectActionCommand : ICommand
    {
        public WindowSelectActionCommand(IWindowSelectAction actionExecuter)
        {
            _actionExecuter = actionExecuter; 
        }

        private IWindowSelectAction _actionExecuter;

        public bool CanExecute(object parameter)
        {
            return true; 
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            _actionExecuter.WindowSelectAction();
        }
    }

	public interface IWindowSelectAction
    {
        void WindowSelectAction();

        WindowSelectActionCommand WindowSelectActionCommand { get; }
    }

}
